//
//  StrategyForeignJourneyParser.m
//  ITrip
//
//  Created by dllo on 15/5/28.
//  Copyright (c) 2015年 lanou3g.com 蓝鸥科技. All rights reserved.
//

#import "StrategyForeignJourneyParser.h"

@implementation StrategyForeignJourneyParser

+ (NSMutableArray *)getParser:(NSData *)data
{
    NSMutableArray *arrayData = [NSMutableArray array];
    NSArray *array = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableContainers error:nil];
    for (NSDictionary *dic in array) {
        StrategyForeignJourneyModel *model = [StrategyForeignJourneyModel getStrategyForeignJourneyModel];
        model.strategyForeignJourneyId = [[dic objectForKey:@"id"] integerValue];
        model.ForeignJourney_description = [dic objectForKey:@"description"];
        model.ForeignJourney_image_url = [dic objectForKey:@"image_url"];
        model.ForeignJourney_name = [dic objectForKey:@"name"];
        model.ForeignJourney_plan_days_count = [[dic objectForKey:@"plan_days_count"]integerValue];
        model.ForeignJourney_plan_nodes_count = [[dic objectForKey:@"plan_nodes_count"]integerValue];
        model.ForeignJourney_updated_at = [[dic objectForKey:@"updated_at"]integerValue];
        model.ForeignJourneyId = [[dic objectForKey:@"id"]integerValue];
        
        
        [arrayData addObject:model];
    }
    return arrayData;
}

@end
